﻿#ifndef RGSMAPTOOLADDFEATURE_H
#define RGSMAPTOOLADDFEATURE_H
#include<QtMath>
#include<qgsmaptooldigitizefeature.h>
#include<qgsmaptooledit.h>
#include"Riskgis.h"


class RgsMapToolAddFeature:public QgsMapToolDigitizeFeature
{
public:

    RgsMapToolAddFeature( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode );
    RgsMapToolAddFeature( QgsMapCanvas *canvas, CaptureMode mode );


private slots:

    void featureDigitized( const QgsFeature &feature ) override;

private:

    bool addFeature( QgsVectorLayer *vlayer, const QgsFeature &f, bool showModal = true );

   //Check if CaptureMode matches layer type. Default is TRUE.
    bool mCheckGeometryType;
};

#endif // RGSMAPTOOLADDFEATURE_H
